<?php

require_once($_SERVER['DOCUMENT_ROOT'].'/mpd/config/config.php');
$dep = $_SESSION['ID_DEPARTEMEN'];
$maxpost=10;


if(!isset($_GET['page'])){
	$pagenow = 1;
} else {
	$pagenow = $_GET['page'];
}
$jumlahhalaman=ceil(mysql_num_rows($query)/$maxpost);

$pagenow = ($pagenow-1)*$maxpost;
	$query=mysql_query("SELECT b.NIP as NIP, b.NAMA as NAMA, b.TANGGAL_MASUK as TANGGAL_MASUK, b.TANGGAL_TETAP as TANGGAL_TETAP, t.NAMA_TEAM as TEAM, d.NAMA_DEPARTEMEN as DEPARTEMEN, s.NAMA_STATUS as STATUS 
					FROM biodata as b, status as s, departemen as d, team as t where s.ID_STATUS = b.ID_STATUS and b.ID_DEPARTEMEN = d.ID_DEPARTEMEN and t.ID_TEAM = b.ID_TEAM and b.ID_DEPARTEMEN=".$dep." GROUP BY b.NIP ORDER BY b.ID_STATUS LIMIT $pagenow, $maxpost");
	//$row=mysql_fetch_row($query);
	
?>